﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace ProjetS5
{
    public class NPC : Character
    {
        public NPC(DB_NonPlayableCharacter Npc, Vector2 Position, Vector2 Orientation, byte Level, DB_CharacterRace CharacterRace)
            : base(Position, Orientation, Level, CharacterRace)
        {
            npc = Npc;
            friendshipLevelId = Npc.FriendshipLevel.Identifier;
            setBaseStats(npc.BaseStatistics);
            calculateNewStats(new Equipment(), "guerrier");
            foreach (DB_PointBar pointBar in npc.PointBars)
            {
                int value = 0;
                value = (int)calculatedStatistics.Single(e => e.Key.Name == pointBar.Name).Value;
                pointBars.Add(pointBar, value);
            }

            name = npc.Name;
        }

        public ProjetS5.DB_NonPlayableCharacter npc;

        public void Move(Vector2 direction)
        {
            Move(direction, npc.Sprites);
        }
    }
}
